Skip to contentSkip to conversation

bulk-adding emails to a mlmmj email list

mlmmj [email protected] 3 participants 4 messages Oct 17, 2014 – Oct 19, 2014

lore
Share & tools
lore
#0 lore raw

Now that I have mjmml working, I'm wondering if there's a way to bulk-add a list of emails to a mailing list?

Here's my scenario, and why I'm asking:
We run 10-15 relatively small lists, most about a dozen addresses, with our largest only about 125 addresses. These are all "closed" subonlypost lists. We occasionally add new lists, when projects come up, and sometimes retire (delete) lists once a project is done.

The idea of having to manually use mlmmj-make-ml to enter each address seems like lot of work. It would be great if one could simply take an ASCII text file, with one address per line, and somehow stuff them all into the mailing list at once, rather than typing out a mlmmj-sub command 125 times.

In our situation we're not concerned about subscribers being able to self-subscribe, or self-unsubscribe, and we're don't normally use or need list archives. I'm not sure if these concerns make the idea of bulk-addition more difficult, but if there's any way to do this, it would make my life a lot easier.

[ I noticed after adding several addresses to a list, that they seem to appear in the /var/spool/mlmmj/listname/subscribers.d/ directory, each address ending up in a single-character-name file, based on the 1st letter in the address - ie. [email protected], [email protected], etc. all ended up in a file called "p". Is it possible to use scripts to simply stuff addresses into these files, based on the 1st character in the address? What would be the implication of doing this independently of the existing mlmmj-sub script? ]

<https://vlsc.org/manager/ispmgr?func=file&plid=var/spool/mlmmj/lightnings&elid=subscribers.d> With the old Majordomo, it was relatively easy for me to setup some PHP admin scripts that let me view/add/edit the list of addresses in an email list, and I'm hoping to do the same with mlmmj.

Philip

P.S. is there a procedure for deleting a mailing list? can one simply delete the .../mlmmj/listdir and all it's contents?

#1 lore raw

On 17 Oct 2014 at 23:20:42, [email protected] ([email protected](mailto:[email protected])) wrote:

[snip]

Quoted 1 line

[ I noticed after adding several addresses to a list, that they seem to appear in the /var/spool/mlmmj/listname/subscribers.d/ directory, each address ending up in a single-character-name file, based on the 1st letter in the address - ie. [email protected](mailto:[email protected]), [email protected](mailto:[email protected]), etc. all ended up in a file called "p". Is it possible to use scripts to simply stuff addresses into these files, based on the 1st character in the address? What would be the implication of doing this independently of the existing mlmmj-sub script? ]

You can just put it in files in the subscribers.d/ directory, yes. You shouldn’t need the same sorting as mlmmj does. Any file will be read as a subscriber file. If you do want mlmmj-sub to do it, just put all addresses in a file and run through it with a simple bash script 1-liner:

$ for ADDR in `cat file-with-addr.txt`; do /path/to/mlmmj-sub -L dir -l $ADDR
Quoted 1 line

With the old Majordomo, it was relatively easy for me to setup some PHP admin scripts that let me view/add/edit the list of addresses in an email list, and I'm hoping to do the same with mlmmj.

It’s just as easy here.

Quoted 1 line

P.S. is there a procedure for deleting a mailing list? can one simply delete the .../mlmmj/listdir and all it's contents?

Correct.

Signature · 4 lines
Mads Martin Joergensen, [email protected]
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
#2 lore raw
In reply to [email protected]
Quoted 7 lines

You can just put it in files in the subscribers.d/ directory, yes. You shouldn’t need the same sorting as mlmmj does. Any file will be read as a subscriber file. If you do want mlmmj-sub to do it, just put all addresses in a file and run through it with a simple bash script 1-liner:

$ for ADDR in `cat file-with-addr.txt`; do /path/to/mlmmj-sub -L dir -l $ADDR

Slight tweak:

mlmmj-sub -L dir -f -q -s -a $ADDR

I would recommend making a script that calls mlmmj-sub rather than manipulating the files manually. It probably won't break delivery, but it probably would break unsubscription/bounce-processing/etc. if they're not in the right file.

Also check out the contrib directory in the distribution for existing web interfaces; I believe one or two of them allow you to bulk-subscribe users. Not sure this is quite what you want, but it's another option.

Ben.

#3 lore raw
In reply to [email protected]
Quoted 2 lines

The idea of having to manually use mlmmj-make-ml to enter each address seems like lot of work.

You don't need to go through the hassle of the text interface of mlmmj-make-ml to make a list. The way I do it myself is I create a number of template lists with the kinds of settings I want, and a script that copies the list directory of whichever template I want, and overwrites the listname and owner tunables (and maybe a couple of other things; can't remember now).

Ben.